package cn.xerllent.wxtp.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Set;

import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

@Data
@Accessors(chain = true)
@TableName (value="wxtp_user")
public class WxUser implements Serializable {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	
	@TableField(value="corp_id")
	private String corpId;

	@TableField(value="user_id")
	private String userId;

	@TableField(value="open_userid")
	private String openUserid;

	
	private String name;
	private String gender;
	private String avatar;
	
	@TableField(value="thumb_avatar")
	private String thumbAvatar;
	
	private String telephone;
	private String alias;
	private String address;
	
	@TableField(value="main_department_id")
	private Integer mainDepartmentId;
	
	/**
	 * 激活状态: 1=已激活，2=已禁用，4=未激活，5=退出企业。
	 * */
	@TableField(value="status")
	private Integer status;
	
	@TableField(fill = FieldFill.INSERT)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime createtime;

	@TableField(fill = FieldFill.INSERT_UPDATE,update = "now()")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private LocalDateTime updatetime;
	
	private String wxpackage;
	
    public @interface Update {
    }

}